<template>
    <div>{{count }} <button @click="count++">+</button> </div>
    <hr>
    <div>{{ p }} <button @click="p.age++">修改</button></div>
</template>
<script lang='ts' setup>
import {ref,reactive,watchEffect} from 'vue'
const count=ref<number>(0)
const p=reactive({
    name:'giles',
    age:40
})
watchEffect(()=>{
    p.age
    count.value
    console.log('----------------------');
    
})
</script>
<style lang='scss' scoped>
</style>